package view;

import controller.Controller;
import controller.ActionLis;

import javax.swing.*;

public class RegisterJFrame extends JFrame {
    public static RegisterJPanel registerJPanel;
    private Controller controller;
    public JMenuBar jMenuBar;
    public JMenu jMenu;
    public  JMenuItem login;
    private ActionLis actionLis=new ActionLis();
    public RegisterJFrame(Controller controller) {
        this.controller=controller;
        setSize(1200, 800);//设置大小
       registerJPanel = new RegisterJPanel(controller);
        setTitle("斗地主注册界面");
        setResizable(false);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        add(registerJPanel);
        jMenuBar = new JMenuBar();
        jMenu = new JMenu("操作");
        jMenuBar.add(jMenu);
        login = new JMenuItem("登录");
        jMenu.add(login);
        setJMenuBar(jMenuBar);
        login.setActionCommand("JMenu");
        login.addActionListener(actionLis);
        pack();
        setLocationRelativeTo(null);
    }
}
